import { createRouter, createWebHistory } from 'vue-router'
import DataSummaryAnalyzePage from '@/pages/DataSummaryAnalyzePage.vue'
import DataDetailAnalyzePage from '@/pages/DataDetailAnalyzePage.vue'
import ChatHistoryPage from '@/pages/ChatHistoryPage.vue'
import UserLoginPage from '@/pages/user/UserLoginPage.vue'
import UserRegisterPage from '@/pages/user/UserRegisterPage.vue'
import UserForgetPasswordPage from '@/pages/user/UserForgetPassswordPage.vue'
import UserModifyPasswordPage from '@/pages/user/UserModifyPasswordPage.vue'
import UserInfoPage from '@/pages/user/UserInfoPage.vue'
import FlightControlPage from '@/pages/FlightControlPage.vue'
import PictureDetailPage from '@/pages/PictureDetailPage.vue'
import DetectionPage from '@/pages/DetectionPage.vue'

const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes: [
    {
      path: '/',
      name: 'dataSummaryAnalyze',
      component: DataSummaryAnalyzePage,
    },
    {
      path: '/user/login',
      name: '用户登录',
      component: UserLoginPage,
    },
    {
      path: '/user/register',
      name: '用户注册',
      component: UserRegisterPage,
    },
    {
      path: '/user/forGetPassword',
      name: '忘记密码',
      component: UserForgetPasswordPage,
    },
    {
      path: '/user/modifyPassword/:userAccount',
      name: '修改密码',
      component: UserModifyPasswordPage,
      props: true,
    },
    {
      path: '/user/info',
      name: '个人信息',
      component: UserInfoPage,
    },
    {
      path: '/flight-control',
      name: 'flightControlPage',
      component: FlightControlPage,
    },
    {
      path: '/detail',
      name: 'dataDetailAnalyze',
      component: DataDetailAnalyzePage,
    },
    {
      path: '/picture',
      name: 'pictureDetailPage',
      component: PictureDetailPage,
    },
    {
      path: '/detection',
      name: 'detectionPage',
      component: DetectionPage,
    },
    {
      path: '/chat_history',
      name: 'chatHistory',
      component: ChatHistoryPage,
    },
  ],
})

export default router
